import java.util.Scanner;

class Solution1 {
    public boolean isPalindrome(String s) {

        char[] sc = s.toLowerCase().toCharArray();
        String st = new String();
        for(int i = 0;i < sc.length;i++) {
            if((sc[i]>=97&&sc[i]<=122)||(sc[i]>=48&&sc[i]<=57)) {
                st = st + sc[i];
            }
        }
        char[] st1 = st.toCharArray();
        int lift = 0;
        int right = st1.length-1;
        while(lift<right) {
            if(st1[lift]!=st1[right]) {
                return false;
            }
            lift++;
            right--;
        }
        return true;
    }
}
public class PalindromicString {
    public static void main(String[] args) {
        Solution1 so = new Solution1();
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        System.out.println(so.isPalindrome(s));
    }
}
